@extends('Home/Layout/baseusercenter')

@section('title', '我的订单')

{{--  首页主体  --}}
@section('main')

@section('title2', '我的订单')
            <div class="uc-content">
                <div class="uc-panel">
                    <div class="uc-bigtit">我的订单</div>
                    <div class="uc-panel-bd">
                        <div class="uc-sort">
                            <div class="uc-tabs">
                                <a class="item" href="{{'/myorder'}}">所有订单</a>
                                <a class="item" href="{{url('/odState0')}}">待付款</a>
                                <a class="item active" href="{{url('/odState1')}}">待发货</a>
                                <a class="item" href="{{url('/odState2')}}">待收货</a>
                            </div>
                            <div class="uc-search">
                                <form action="{{'/search'}}" method="get">
                                    <input type="text" name='keyword' class="sch-input" placeholder="输入商品名称,订单号，商品编号" />
                                    <button class="sch-btn"><i class="iconfont icon-search"></i></button>
                                </form>
                            </div>
                        </div>
                        <table class="uc-table">
                            <thead>
                                <td></th>
                                <th></th>
                                <th></th>
                                <th width="120"></th>
                            </thead>
                            @foreach ($userorder as $val)
                            <tr class="hd order-meta">
                                <td colspan="4">
                                    <div class="left">{{substr($val->created_at, 0, 10)}} 订单号: {{$val->orders_num}}</div>
                                    <div class="right">
                                        <span class="del iconfont icon-shanchu"></span>
                                    </div>
                                </td>
                            </tr>
                            <tr class="order-goods">
                                <td>
                                    <div class="goods-info">
                                        <img class="figure" src="" alt="" />
                                         
                                        <div class="info">
                                            <div>{{$val->gname}} | {{$val->color}} | {{$val->size}}</div>
                                            <div>{{$val->deal_price}}元×{{$val->buy_num}}</div>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    金额：<span class="text-theme fwb">{{$val->orders_sum}}元</span>
                                </td>
                                <td>
                                    @php
                                        $oid = $val->oid;
                                    @endphp
                                    <a class="text-info" href="{{url('/orders_detail', $val->oid)}}">订单详情</a><br />
                                </td>
                                @if ($val->state == 0) 
                                <td>
                                    <a href="{{url('/dopay', $val->oid)}}" class="ui-btn-theme uc-btn-md">去付款</a>
                                </td>
                                @elseif ($val->state == 1)
                                <td>
                                    <button class="ui-btn-theme uc-btn-md" disabled="">待发货</button>
                                </td>
                                @elseif ($val->state == 2)
                                <td>
                                    <a href="" class="ui-btn-theme uc-btn-md">待收货</a>
                                </td>
                                @elseif ($val->state == 3)
                                <td>
                                    <button class="ui-btn-theme uc-btn-md" disabled="">交易完成</button>
                                </td>
                                @endif
                            </tr>
                            @endforeach         
                        </table>
                       <!--  <div class="pages">
                            <a class="page prev" href="">上一页</a>
                            <a class="page" href="">1</a>
                            <span class="cur-page">2</span>
                            <a class="page" href="">3</a>
                            <a class="page" href="">4</a>
                            <i class="page-split">...</i>
                            <a class="page" href="">71</a>
                            <a class="page next" href="">下一页</a>
                        </div> -->

<!--                         <div class="ta-c">
                            <ul class="pagination">
                                <li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">«</span></a></li>
                                <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#" aria-label="Next"><span aria-hidden="true">»</span></a></li>
                             </ul>
                        </div> -->
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('footer-js')


@endsection
